<% content_for :css do %>
  <%= stylesheet_link_tag 'index','buyers_index' %>
<% end %>
<% content_for :title do %>-零售客户<% end %>
<div class='body'>
  <div class='top'>
    <div class='title'>
      <b>基础数据</b><span>零售客户</span>
    </div>
  </div>  
  <div class="search">
    <%= form_tag buyers_url,
          :method => :get do %> 
      <%= hidden_field_tag :target, params[:target] %>
      <%= text_field_tag :key_words, params[:key_words] ,:class => :search, :onfocus => 'select()' %>
      <%= submit_tag '查找客户', :class => :bb %>
      <%= link_to '新增客户', new_employee_url,  :class => :new %>
    <% end %>
  </div>  
  <div class="page">
    <div class="total_currnet"><p>共</p><b><%= @buyers.size %></b><p>位客户</p></div>
  </div>    
  <div class="index">  
    <% @buyers.each do |buyer| %>
    <div id='buyer_<%= buyer.id %>' class="monomer">
      <div class="content">
        <div class="title">
          <div class="name">
            <b><%= buyer.full_name %></b><%= t buyer.sex %>
          </div>
          <div class="information">
            <p class="statistics">
              <%= buyer.mobile %>
            </p>
            <p class="statistics">
              <%= buyer.link_phone %>
            </p>
            <p class="message">
              <%= buyer.address %>
            </p>
          </div>
        </div>      
        <div class="article">
          <%= buyer.remark %>
        </div>
      </div>
      <div class="operate">
        <%= link_to '修改',edit_buyer_url(buyer), :class => 'button' %>
      </div>
    </div>
    <% end %>
  </div>
  <div class="page">
    <div class="total_currnet"><p>共</p><b><%= @buyers.size %></b><p>位客户</p></div>
  </div>      
</div>

        